home *** CD-ROM | disk | FTP | other *** search
- /*
- * QuicKeys.h : Types and defines for interacting with QuicKeys internals. This information is based
- * on Chapter 8 of the QuicKeys manual. Typed in by Dewi Williams. Delphi: DEWI, who is
- * responsible for any typos here!
- *
- * The QuicKeys keyboard enhancer is a product of CE Software, 801 73rd Street,
- * Des Moines, Iowa 50312. (515) 224-1995.
- */
-
-
- /* Defines */
-
- /* QuicKey command types (for the QKtype field of the key record). */
- #define QK_UNUSED 0 /* Empty key record */
- #define QK_FILE 1
- #define QK_TEXT 2
- #define QK_MENU 3
- #define QK_DA 4
- #define QK_OTHER 5
- #define QK_ALIAS 6
- #define QK_CLICK 7
- #define QK_SEQUENCE 8
- #define QK_BUTTON 9
-
- /* QuicKey "Other" command types. */
- #define QKO_LINEUP 0
- #define QKO_LINEDN 1
- #define QKO_PAGEUP 2
- #define QKO_PAGEDN 3
- #define QKO_HOME 4
- #define QKO_END 5
- #define QKO_COLLEFT 6
- #define QKO_COLRIGHT 7
- #define QKO_PGLEFT 8
- #define QKO_PGRIGHT 9
- #define QKO_CLWIND 10
- #define QKO_ZMWIND 11
- #define QKO_TRANSFER 12
- #define QKO_SHUTDN 13
- #define QKO_RESTART 14
- #define QKO_SELRWIND 16
- #define QKO_SEL2WIND 17
- #define QKO_QUOTES 18
- #define QKO_DQUOTES 19
- #define QKO_QUICREF 20
- #define QKO_TOGGLE 21
- #define QKO_READ 22
- #define QKO_DATE1 23
- #define QKO_DATE2 24
- #define QKO_DATE3 25
- #define QKO_DATE4 26
- #define QKO_DATE5 27
- #define QKO_DATE6 28
- #define QKO_DATE7 29
- #define QKO_DATE8 30
- #define QKO_TIME1 32
- #define QKO_TIME2 34
- #define QKO_FKBASE 101 /* Base for FKEYs. Add ID value on to this. */
-
- #define N_QCKEYS 100 /* Number of entries in the key record arrays. */
-
- /* Types */
-
- /*
- * Format of the key record within QuicKeys' system heap block.
- */
-
- typedef struct {
- unsigned key; /* Keycode and ascii value as returned by GetNextEvent */
- unsigned modifiers; /* Modifiers as returned by GetNextEvent, masked */
- int QKtype; /* Variant */
- union {
- struct { /* QuicKeys File */
- char filename[32];
- char volname[32];
- long dirID;
- ResType fileType;
- } QKFile;
-
- struct { /* QuicKeys text to type */
- char text[72];
- } QuicText;
-
- struct { /* QuicKeys menu */
- char menu[72];
- } QuicMenu;
-
- struct { /* QuicKeys DA */
- char da[72];
- } QuicDA;
-
- struct { /* QuicKeys Other (e.g. mousies, special, datestamps) */
- int cmd; /* See the defines above starting with "QKO_" */
- } QuicOther;
-
- struct { /* QuicKeys Alias */
- unsigned key; /* Replacement keycode and ascii value */
- unsigned modifiers; /* Replacement modifiers */
- } QuicAlias;
-
- struct { /* QuicKeys Click */
- char title[28]; /* Title of the click */
- char wtitle[28]; /* Title of the window to look for */
- int nclicks; /* Number of clicks */
- int specific; /* Look for specific window. Really boolean + pad. */
- int mUpFormat; /* Mouse up format: Absolute/relative/window etc. */
- Point mouseUp;
- int mDownFormat; /* Mouse down format: Absolute/relative/window etc. */
- Point mouseDown;
- } QuicClick;
-
- struct { /* QuicKeys Sequence */
- char title[12]; /* QuicKeys sequence title */
- int step[30]; /* Individual steps of sequence as a keycode/modifiers */
- } QuicSequence;
-
- struct {
- char name[72]; /* Name of the button */
- } QuicButton;
- } u;
- } KeyRecord;
-
- typedef struct { /* QuicKeys INIT system heap block */
- long magic; /* Hex value of a89f1234 */
- long signature; /* CE Software's signature of 'CELN' */
- long version; /* Version number of 0. */
- ProcPtr SetLaunch; /* Vector */
- long unknown1; /* Undocumented */
- ProcPtr FindAnApp; /* Vector */
- Byte unknown2[16]; /* Undocumented */
- ProcPtr PlotAnItem; /* Vector */
- long unknown3; /* Undocumented */
- KeyRecord universal[N_QCKEYS]; /* Universal keys */
- KeyRecord application[N_QCKEYS]; /* Program-specific keys */
- } QuicInit;
-
- /*
- * And the block together with its memory manager header.
- */
-
- typedef struct { /* QuicInit and its block header */
- Byte header[8]; /* Memory manager block header */
- QuicInit quic;
- } QuicInitBlock;
-
- /* Prototypes */
- QuicInitBlock *FindSysHeap(void);
- KeyRecord *FindKeyRecord(QuicInitBlock *qb, StringPtr name, Boolean progKeys);
-